<template>
  <div class="home">
    <el-container>
      <el-header class="el-header">
        <h1 style="margin-top: 11px">个人中心</h1>
        <div style="position: absolute;top: 2px;right: 350px">
          <el-button type="primary" icon="el-icon-search" style="background-color:#ea7479;border:none"></el-button>
          <input type="text"icon="" style="height: 30px;border-radius:5px" placeholder="   请输入关键字">
          <el-badge :value="3" class="item" style="width: 50px;height: 50px;margin-top: 10px">
            <el-button class="share-button" icon="el-icon-bell" style="background-color: #ea7479;border:none;color: white;margin: auto 10px"></el-button>
          </el-badge>
          <el-dropdown style="margin-left: 20px">
            <el-button  style="background-color: #ea7479;border:none;">
              <i class="el-icon-s-custom"style="color: white"></i><i style="color: white">Administrator</i><i class="el-icon-arrow-down el-icon--right"style="color: white"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>黄金糕</el-dropdown-item>
              <el-dropdown-item>狮子头</el-dropdown-item>
              <el-dropdown-item>螺蛳粉</el-dropdown-item>
              <el-dropdown-item>双皮奶</el-dropdown-item>
              <el-dropdown-item>蚵仔煎</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <i class="el-icon-star-on"style="color: white"></i>
        </div>
      </el-header>
      <el-container class="el-body">
        <el-aside width="200px" class="el-aside">
          <el-menu
              router
              default-active="/my-info"
              class="el-menu-vertical-demo"
              background-color="#fff"
              text-color="#fff"
              active-text-color="#ffd04b">
            <el-menu-item index="/student-bookstore">
              <template slot="title">
                <i class="el-icon-s-home"style="color: black"></i>
                <span style="color: black">首页</span>
              </template>
            </el-menu-item>
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-goods"style="color: black"></i>
                <span style="color: black">账户管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/my-info"><i class="el-icon-shopping-bag-1"style="color: black">个人资料</i></el-menu-item>
                <el-menu-item index="/update-info"><i class="el-icon-menu"style="color: black">修改资料</i></el-menu-item>
                <el-menu-item index=""><i class="el-icon-circle-plus-outline"style="color: black">我的优惠券</i></el-menu-item>
                <el-menu-item index=""><i class="el-icon-zoom-in"style="color: black">我的礼品卡</i></el-menu-item>
                <el-menu-item index=""><i class="el-icon-picture"style="color: black">收货地址</i></el-menu-item>
                <el-menu-item index=""><i class="el-icon-s-grid"style="color: black">账号安全</i></el-menu-item>
                <el-menu-item index=""><i class="el-icon-s-management"style="color: black">账号绑定</i></el-menu-item>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  },
  created() {
    // location.href="/my-info"
    // return
  }
}
</script>
<style>
.el-header {
  background-color: #ab0022;
}

.el-aside {
  background-color: #fff;
}

.el-body {
  top: 60px;
  position: absolute;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
}

</style>